#include "../comm.h"
class Solution {
public:
    int countTestedDevices(vector<int>& batteryPercentages) {
        int ans = 0, del = 0;
        for(int i = 0; i < batteryPercentages.size(); ++i)
        {
            if(batteryPercentages[i] - del > 0)
                ++ans, ++del;
            else
                continue;
        }
        return ans;
    }
};